<!--邀请好友-->
<template>
  <div class="all bg1">
  </div>
</template>

<style src="@/_css/style.css" ></style>
<style scoped>
</style>

<script>
import jnavigator from "@/_js/navigator";
import jmodal from "@/_js/modal";
import jhttps from "@/_js/https";

const weexFunction = weex.requireModule("WeexFunction");
import I18N from "@/_i18n/i18n";
var T = I18N.t;
weexFunction.setTitle(T("邀请好友"));

//单独设置分配比例
export default {
  
  data() {
    return {
      T:T,
    };
  },

  //即将显示
  mounted() {
    this.httpsIsPartner();  
  },

  methods: {
    //合伙人判断
    httpsIsPartner(){
      jmodal.showLoad();
      var param = {};
      jhttps.post("partner/isPartner",param,true,(data)=>{
        jmodal.hideLoad();
        if(data.status == 200){
          setTimeout(() => {
            data = data.data;
            var nav = {'navColor':'#0c0c0c'};
            if(data.isPartner){
              jnavigator.load('', 'invite/PartnerHome', undefined, nav);
            } else {
              jnavigator.load('', 'invite/InviteHome', undefined, nav);
            }
          }, 1500);
        }else{
          jmodal.toast(data.msg);
        }
      });
    },
  },
};
</script>
